package com.ttn.business.openfeign;

import com.ttn.business.openfeign.fallback.StudentRecordFeignServiceFallbackFactory;
import com.ttn.common.core.entity.Result;
import com.ttn.common.core.entity.business.Order;
import com.ttn.common.core.entity.studentrecord.StudentRecord;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "ttn-student", fallbackFactory = StudentRecordFeignServiceFallbackFactory.class)
public interface StudentRecordFeignService {
    @PostMapping("/student-record/service/query/student-record-by-id/{id}")
    Result<StudentRecord> serviceQueryStudentRecordById(@PathVariable Integer id);

    @PutMapping("/student-record/service/modify/student-record-deadLine")
    Result modifyStudentRecordDeadLine(@RequestBody Order order);

}
